package com.unicom.auth.controller;

import java.io.File;

import com.jfinal.aop.Clear;
import com.jfinal.kit.StrKit;
import com.unicom.auth.controller.base.BaseController;

public class ViewController extends BaseController {

	@Clear
	@Override
	public void index() {
		String resc=getPara("resc");
		String type=getPara("type");
		String code=getPara("code");
		if (StrKit.notBlank(code)) {
			setAttr("code", code);
		}
		File file=new File(getRealPath()+BASE_PATH+"/"+resc+"/view/"+type+".html");
		if (file.exists()) {
			myRender("/"+resc+"/view/"+type+".html");
		}else{
			render("/404.html");
		}
		
	}

}
